home *** CD-ROM | disk | FTP | other *** search
- //==============================================================================
- // File: ASClientErrors.h
- //
- // Copyright (C) 1992-1995 Apple Computer, Inc. All rights reserved.
- //
- // Description: The definition of errors that can be generated by either the
- // client or server. In general, the 1000 series code are those
- // generated by the server, while the 3000 series codes are
- // generated by the client.
- //
- // Change History: (moved to bottom of file)
- //==============================================================================
-
- #ifndef ASCLIERR_H
- #define ASCLIERR_H
-
-
- //------------------------------------------------------------------------------
- // Dependencies
- //------------------------------------------------------------------------------
-
- #ifndef DPAPI_H
- #ifdef WINDOWS
- #include "dpapi.h"
- #endif // WINDOWS
- #ifdef MACINTOSH
- #include "DarkPassageAPI.h"
- #endif // MACINTOSH
- #endif // DPAPI_H
-
-
- //------------------------------------------------------------------------------
- // Constants for Parameter Block Range Checking
- //------------------------------------------------------------------------------
-
- // Search
-
- const long kMinQuerySize = 1;
- const long kMaxQuerySize = 1000;
- const long kMinRankAllowed = 1;
- const long kMaxRankAllowed = 5;
- const long kMinHitsAllowed = 1;
- const long kMaxHitsAllowed = 30000;
-
- // Reporter
-
- const long kMaxReporterName = 20;
- const long kMinReporterQuerySize = 0;
- const long kMinReporterSources = 0;
- const long kMinReporterFlags = 0;
- const long kMaxReporterFlags = 1;
- const long kMaxDeliveryDays = 0x7F; // all seven days of the week
- const long kMaxDeliveryTime = 86399L; // 11:59:59PM in ticks
-
- // GetText/Original
-
- const long kMinTextSize = 1;
- const long kMaxTextSize = 30000; // this is the server maximum
- // and may not necessarily be the
- // operating text size limit imposed
- // in the client
- const long kMaxGetOriginalFileFlag = 2;
-
- // GetRelatedTerms
-
- const long kMinTermsAllowed = 1;
- const long kMaxTermsAllowed = 100;
-
-
-
-
- //------------------------------------------------------------------------------
- // Error Codes Generated by the Client
- //------------------------------------------------------------------------------
-
- // OS level error
-
- const ASErr kUnknownErr = 3000;
- const ASErr kOutOfMemoryErr = 3001;
- const ASErr kOutOfMemoryNoObjectErr = 3002;
- const ASErr kOutOfMemoryNoPBErr = 3003;
- const ASErr kFileSystemErr = 3004;
- const ASErr kFileRenamedWarning = 3005;
-
-
- //------------------------------------------------------------------------------
- // House-Keeping Function Errors
- //------------------------------------------------------------------------------
-
- const ASErr kMaxRegisteredErr = 3101;
- const ASErr kInvalidRegistrationIDErr = 3102;
- const ASErr kAlreadyLoggedOnErr = 3103;
- const ASErr kLogOnCancelErr = 3104;
- const ASErr kStillLoggedOnErr = 3105;
- const ASErr kNotLoggedOnErr = 3106;
- const ASErr kNoIdentificationErr = 3108;
- const ASErr kNoCompletionProcErr = 3109;
- const ASErr kAlreadyLoggingOnErr = 3112;
- const ASErr kLogoffPendingErr = 3113;
-
- //const ASErr kAuthExtensionNotFoundErr = 3201;
- //const ASErr kAuthExtensionOutOfMemoryErr = 3202;
-
-
- const ASErr kInvalidDeliveryDaysErr = 3407;
- const ASErr kInvalidDeliveryTimeErr = 3408;
- const ASErr kDeliveryAlreadyInProgressErr = 3410;
-
- // session errors
-
- const ASErr kReplyMatchesNoRequestErr = 3601;
- const ASErr kInvalidReplyDataErr = 3602;
- const ASErr kInvalidRequestDataErr = 3603;
- const ASErr kCommStackErr = 3604;
- const ASErr kTransactionTimedOutErr = 3605;
-
- // other errors
- const ASErr kUsingDfltDeliveryDir = 3606;
- const ASErr kConsultASLogErr = 3607;
- const ASErr kBadImportFileErr = 3608;
- const ASErr kReporterDeliveryAborted = 3609;
-
- // The following error codes are not in the final API spec and seem to be
- // left over from an earlier version of the project.
-
- // search errors
-
- const ASErr kQueryLengthRangeErr = 1017; // (kNoQueryString); used to be 3301
- const ASErr kQueryEmptyStringErr = 1017; // (kNoQueryString); used to be 3302
- const ASErr kQueryMissingStringErr = 1017; // (kNoQueryString); used to be 3303
- const ASErr kQueryStringMissingErr = 1017; // (kNoQueryString); used to be 3304
- const ASErr kMaxHitsRangeErr = 1020; // (kInvalidMaxHits); used to be 3306
-
- // reporter errors
-
- const ASErr kReporterNameEmptyErr = 1025; // (kInvalidObjectName); used to be 3402
- const ASErr kReporterNameLengthErr = 1025; // (kInvalidObjectName); used to be 3403
- const ASErr kReporterNameMissingErr = 1025; // (kInvalidObjectName); used to be 3404
- const ASErr kDeliveryDirLengthErr = 1026; // (kInvalidObjectData); used to be 3405
- const ASErr kDeliveryDirMissingErr = 1026; // (kInvalidObjectData); used to be 3406
- const ASErr kReporterSourceCountErr = 3409;
- const ASErr kMissingSourceErr = 1006; // (kInvalidSourceID); used to be 3410
-
- // dbObject errors
-
- const ASErr kDBObjectNameLengthErr = 1025; // (kInvalidObjectName); used to be 3502
- const ASErr kDBObjectNameMissingErr = 1025; // (kInvalidObjectName); used to be 3503
- const ASErr kDBObjectDataLengthErr = 1026; // (kInvalidObjectData); used to be 3504
- const ASErr kDBObjectDataMissingErr = 1026; // (kInvalidObjectData); used to be 3505
-
- // *** end of old error codes ***
-
-
-
- //----------------------------------------------------------------------------------------------------
- // Error Codes Returned by the Server
- //----------------------------------------------------------------------------------------------------
-
- const ASErr kInvalidRequestForGuestErr = 1001; // when guests try to make database requests
- const ASErr kInvalidSessionIDErr = 1002; // when client sends a non-existing session ID
- const ASErr kRequestIDNotFoundErr = 1003; // when client tries to cancel an invalid request
- const ASErr kSessionIDNotFoundErr = 1004; // when client tries to log off with invalid session ID
- const ASErr kTransactionFailedErr = 1005; // requested pls transaction failed
- const ASErr kInvalidSourceIDErr = 1006; // when client sends a non-existing info source ID
- const ASErr kInvalidDocIDErr = 1007; // when client sends a non-existing document ID
- const ASErr kNoAccessPriviligesErr = 1008; // when client tries to access a file for which he doesn't
- // have access
- const ASErr kServerGoingDownErr = 1009; // when the server is in the process of shutting down
- const ASErr kInvalidObjectIDErr = 1010; // object id for ObjectRequest is bad
- const ASErr kNoSharingOnServerErr = 1011; // server doesn't have File Sharing or AppleShare running
- const ASErr kWrongProtocolErr = 1012; // client is using the wrong protocol version
- const ASErr kFileNotFoundErr = 1013; // GetFile wasn't able to locate the file
- const ASErr kDuplicateNameErr = 1014; // Tried to add reporter with name that exists
- const ASErr kTooManyUsersErr = 1015; // Max # of users already logged in
- const ASErr kInfoSourceHiddenErr = 1016; // Info source on which you tried to execute this request is
- // Hidden.
- const ASErr kNoQueryStringErr = 1017; // when client sends a zero-lebgth query string
- const ASErr kQueryStringTooLongErr = 1018; // when client sends a very long query string
- const ASErr kInvalidMinRankErr = 1019; // min rank requested not in the range (1..5)
- const ASErr kInvalidMaxHitsErr = 1020; // Max hits requested <= 0 on search request
- const ASErr kInvalidMaxTermsErr = 1021; // Max terms requested <= 0 on related terms request
- const ASErr kInvalidTextBoundsErr = 1022; // The startByte/endByte combo doesn't make sense
- const ASErr kInvalidOperationErr = 1023; // Invalid operation in DBObject/DBDBReporter request
- const ASErr kInvalidObjectTypeErr = 1024; // invalid objectType in DBObject/DBEnumerate req
- const ASErr kInvalidObjectNameErr = 1025; // bogus objectName
- const ASErr kInvalidObjectDataErr = 1026; // objectDataSize is bogus
- const ASErr kInvalidFlagsErr = 1027; // Flags field is invalid (DBReporter/GetFile)
- const ASErr kInvalidSubSessionIDErr = 1028; // invalid subSessionID
- const ASErr kDuplicateTickleErr = 1029; // duplicate Tickle request
- const ASErr kParamErr = 1030; // received a mal-formed request (too short, or too long)
- const ASErr kInternalErr = 1031; // Bad things happened on the server. May be it's time to
- // restart.
- const ASErr kQuerySyntaxErr = 1032; // Syntax error in query
- const ASErr kFileModSinceIndexErr = 1033; // The file has been modified since indexing, so you can't
- // do GetText on it.
- const ASErr kDiskFull = 1035; // Disk is full on server. Can't complete request
- const ASErr kDemoError = 1036; // The limits of the demonstration version have been exceeded
- const ASErr kGatewayLost = 1037; // Could not make contact with the gateway
- const ASErr kNoValidDates = 1038; // No articles for Update had valid dates
-
- const ASErr kWAISError = 1039; // WAIS server violated protocol
- const ASErr kWAISSrcUnavailable = 1040; // WAIS server unavailable, try later
- const ASErr kTCPProblem = 1041; // TCP error in Internet communication
- const ASErr kServerTooBusy = 1042; // Server is overloaded and cannot handle the request
-
-
- #endif // ASCLIERR_H
-
- //==============================================================================
- // Change History:
- //
- // Date By Description
- // ---- -- -----------
- // 03/16/94 SW Changed include declarations.
- //
- // $Log: /bogart/dp/shared/ASCLIERR.H $
- //
- // 17 4/18/95 7:33p Rjohnson
- //
- //==============================================================================
-
-